package com.ddl.armark1;

import java.util.List;

import android.os.Bundle;
import android.app.Activity;
import android.content.Context;
import android.view.Menu;
import android.location.*;

public class GuiameActivity extends Activity {

	private LocationManager locManager;
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_guiame);
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.guiame, menu);
		return true;
	}
	
	//*initLocation -> ubicacion*/
	private void ubicacion(){
		locManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE);
		Location loc = locManager.getLastKnownLocation(LocationManager.GPS_PROVIDER);
		
		System.out.println(String.valueOf(loc.getLatitude()));
	}
	
	private void getListProviders(){
		locManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE);
		List<String> listaProviders = locManager.getAllProviders();
		
		LocationProvider provider = locManager.getProvider(listaProviders.get(0));
		System.out.println(provider.getAccuracy());
		System.out.println(provider.supportsAltitude());
		System.out.println(provider.getPowerRequirement());
	}
	

}
